package com.dbsop.domain.agg;

import com.dbsop.common.enums.Order;
import com.dbsop.domain.rest.info.RFFM;
import java.util.List;

/**
 * 分组
 */
public interface Group {

    public Group getGroup() ;

    public void setGroup(Group group) ;

    public List<AggOperation> getAggOperations() ;

    public void add(AggOperation aggOperation);

    public int getSize() ;

    public Group groupSub(String fieldName);

    public Group groupSub(String fieldName, String formatName);


    public Group rangeSub(String fieldName, RFFM ... rffms);

    public Group rangeSub(String fieldName, String formatName, RFFM ... rffms);


    public Group sum(String fieldName);

    public Group avg(String fieldName);

    public Group count(String fieldName);

    public Group max(String fieldName);

    public Group maxExtFields(String fieldName, String... fields);

    public Group maxExtFields(String fieldName, int num, String... fields);

    public Group min(String fieldName);

    public Group minExtFields(String fieldName, String... fields);

    public Group minExtFields(String fieldName, int num, String... fields);

    public Group sum(String fieldName, String formatName);

    public Group avg(String fieldName, String formatName);

    public Group count(String fieldName, String formatName);

    public Group max(String fieldName, String formatName);

    public Group min(String fieldName, String formatName);

    public Group size(int size);

    public Group order(Order order, String ...fieldNames);

    public Group orderKey(Order order);


    public void cleanAgg();
}
